package com.example.guetdemo.domain.dto;

import com.example.guetdemo.annotations.StrongPassword;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginDto {

    //用户名
    @NotBlank(message = "用户名不能为空")
    @Length(min =6 , max = 20 , message = "用户名长度需要在6-20之间")
    private String userName;

    //密码
    @NotBlank(message = "密码不能为空")
    @Length(min =6 , max = 20 , message = "密码长度需要在6-20之间")
    private String password;
}
